3.1116 \(\int x (d+e x^2) (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=82 \[ \frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac{b x \left (2 c^2 d-e\right )}{4 c^3}-\frac{b \left (c^2 d-e\right )^2 \tan ^{-1}(c x)}{4 c^4 e}-\frac{b e x^3}{12 c} \]

[Out]

-(b*(2*c^2*d - e)*x)/(4*c^3) - (b*e*x^3)/(12*c) - (b*(c^2*d - e)^2*ArcTan[c*x])/(4*c^4*e) + ((d + e*x^2)^2*(a
+ b*ArcTan[c*x]))/(4*e)

________________________________________________________________________________________

Rubi [A]  time = 0.0698475, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {4974, 390, 203} \[ \frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac{b x \left (2 c^2 d-e\right )}{4 c^3}-\frac{b \left (c^2 d-e\right )^2 \tan ^{-1}(c x)}{4 c^4 e}-\frac{b e x^3}{12 c} \]

Antiderivative was successfully verified.

[In]

Int[x*(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

-(b*(2*c^2*d - e)*x)/(4*c^3) - (b*e*x^3)/(12*c) - (b*(c^2*d - e)^2*ArcTan[c*x])/(4*c^4*e) + ((d + e*x^2)^2*(a
+ b*ArcTan[c*x]))/(4*e)

Rule 4974

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(x_)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[((d + e*x^2)^(q +
1)*(a + b*ArcTan[c*x]))/(2*e*(q + 1)), x] - Dist[(b*c)/(2*e*(q + 1)), Int[(d + e*x^2)^(q + 1)/(1 + c^2*x^2), x
], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x \left (d+e x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac{(b c) \int \frac{\left (d+e x^2\right )^2}{1+c^2 x^2} \, dx}{4 e}\\ &=\frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac{(b c) \int \left (\frac{\left (2 c^2 d-e\right ) e}{c^4}+\frac{e^2 x^2}{c^2}+\frac{c^4 d^2-2 c^2 d e+e^2}{c^4 \left (1+c^2 x^2\right )}\right ) \, dx}{4 e}\\ &=-\frac{b \left (2 c^2 d-e\right ) x}{4 c^3}-\frac{b e x^3}{12 c}+\frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac{\left (b \left (c^2 d-e\right )^2\right ) \int \frac{1}{1+c^2 x^2} \, dx}{4 c^3 e}\\ &=-\frac{b \left (2 c^2 d-e\right ) x}{4 c^3}-\frac{b e x^3}{12 c}-\frac{b \left (c^2 d-e\right )^2 \tan ^{-1}(c x)}{4 c^4 e}+\frac{\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{4 e}\\ \end{align*}

Mathematica [A]  time = 0.0043604, size = 103, normalized size = 1.26 \[ \frac{1}{2} a d x^2+\frac{1}{4} a e x^4+\frac{b d \tan ^{-1}(c x)}{2 c^2}+\frac{b e x}{4 c^3}-\frac{b e \tan ^{-1}(c x)}{4 c^4}+\frac{1}{2} b d x^2 \tan ^{-1}(c x)-\frac{b d x}{2 c}-\frac{b e x^3}{12 c}+\frac{1}{4} b e x^4 \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

-(b*d*x)/(2*c) + (b*e*x)/(4*c^3) + (a*d*x^2)/2 - (b*e*x^3)/(12*c) + (a*e*x^4)/4 + (b*d*ArcTan[c*x])/(2*c^2) -
(b*e*ArcTan[c*x])/(4*c^4) + (b*d*x^2*ArcTan[c*x])/2 + (b*e*x^4*ArcTan[c*x])/4

________________________________________________________________________________________

Maple [A]  time = 0.037, size = 86, normalized size = 1.1 \begin{align*}{\frac{ae{x}^{4}}{4}}+{\frac{a{x}^{2}d}{2}}+{\frac{b\arctan \left ( cx \right ) e{x}^{4}}{4}}+{\frac{b\arctan \left ( cx \right ) d{x}^{2}}{2}}-{\frac{be{x}^{3}}{12\,c}}-{\frac{bdx}{2\,c}}+{\frac{bex}{4\,{c}^{3}}}+{\frac{\arctan \left ( cx \right ) bd}{2\,{c}^{2}}}-{\frac{b\arctan \left ( cx \right ) e}{4\,{c}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(e*x^2+d)*(a+b*arctan(c*x)),x)

[Out]

1/4*a*e*x^4+1/2*a*x^2*d+1/4*b*arctan(c*x)*e*x^4+1/2*b*arctan(c*x)*d*x^2-1/12*b*e*x^3/c-1/2*b*d*x/c+1/4*b*e*x/c
^3+1/2*b*d*arctan(c*x)/c^2-1/4*b*e*arctan(c*x)/c^4

________________________________________________________________________________________

Maxima [A]  time = 1.41794, size = 119, normalized size = 1.45 \begin{align*} \frac{1}{4} \, a e x^{4} + \frac{1}{2} \, a d x^{2} + \frac{1}{2} \,{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d + \frac{1}{12} \,{\left (3 \, x^{4} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b e \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/4*a*e*x^4 + 1/2*a*d*x^2 + 1/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d + 1/12*(3*x^4*arctan(c*x)
- c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*e

________________________________________________________________________________________

Fricas [A]  time = 1.75088, size = 197, normalized size = 2.4 \begin{align*} \frac{3 \, a c^{4} e x^{4} + 6 \, a c^{4} d x^{2} - b c^{3} e x^{3} - 3 \,{\left (2 \, b c^{3} d - b c e\right )} x + 3 \,{\left (b c^{4} e x^{4} + 2 \, b c^{4} d x^{2} + 2 \, b c^{2} d - b e\right )} \arctan \left (c x\right )}{12 \, c^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/12*(3*a*c^4*e*x^4 + 6*a*c^4*d*x^2 - b*c^3*e*x^3 - 3*(2*b*c^3*d - b*c*e)*x + 3*(b*c^4*e*x^4 + 2*b*c^4*d*x^2 +
 2*b*c^2*d - b*e)*arctan(c*x))/c^4

________________________________________________________________________________________

Sympy [A]  time = 1.56302, size = 114, normalized size = 1.39 \begin{align*} \begin{cases} \frac{a d x^{2}}{2} + \frac{a e x^{4}}{4} + \frac{b d x^{2} \operatorname{atan}{\left (c x \right )}}{2} + \frac{b e x^{4} \operatorname{atan}{\left (c x \right )}}{4} - \frac{b d x}{2 c} - \frac{b e x^{3}}{12 c} + \frac{b d \operatorname{atan}{\left (c x \right )}}{2 c^{2}} + \frac{b e x}{4 c^{3}} - \frac{b e \operatorname{atan}{\left (c x \right )}}{4 c^{4}} & \text{for}\: c \neq 0 \\a \left (\frac{d x^{2}}{2} + \frac{e x^{4}}{4}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x**2+d)*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d*x**2/2 + a*e*x**4/4 + b*d*x**2*atan(c*x)/2 + b*e*x**4*atan(c*x)/4 - b*d*x/(2*c) - b*e*x**3/(12*
c) + b*d*atan(c*x)/(2*c**2) + b*e*x/(4*c**3) - b*e*atan(c*x)/(4*c**4), Ne(c, 0)), (a*(d*x**2/2 + e*x**4/4), Tr
ue))

________________________________________________________________________________________

Giac [A]  time = 1.1876, size = 154, normalized size = 1.88 \begin{align*} \frac{3 \, b c^{4} x^{4} \arctan \left (c x\right ) e + 3 \, a c^{4} x^{4} e + 6 \, b c^{4} d x^{2} \arctan \left (c x\right ) + 6 \, a c^{4} d x^{2} - b c^{3} x^{3} e - 6 \, \pi b c^{2} d \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 6 \, b c^{3} d x + 6 \, b c^{2} d \arctan \left (c x\right ) + 3 \, b c x e - 3 \, b \arctan \left (c x\right ) e}{12 \, c^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

1/12*(3*b*c^4*x^4*arctan(c*x)*e + 3*a*c^4*x^4*e + 6*b*c^4*d*x^2*arctan(c*x) + 6*a*c^4*d*x^2 - b*c^3*x^3*e - 6*
pi*b*c^2*d*sgn(c)*sgn(x) - 6*b*c^3*d*x + 6*b*c^2*d*arctan(c*x) + 3*b*c*x*e - 3*b*arctan(c*x)*e)/c^4